﻿<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{$Think.session.mycity}{$br}{$se}<if condition="$pr neq '' ">{$titlepr}</if>
	<if condition="$ag neq '' ">{$titleag}</if>二手车报价_最新{$Think.session.mycity}{$br}{$se}<if condition="$pr neq '' ">{$titlepr}</if>
	<if condition="$ag neq '' ">{$titleag}</if>个人二手车出售转让交易信息-58链车二手车交易市场</title>
<link rel="stylesheet" href="/Public/Home/css/reset.css">
<link rel="stylesheet" href="/Public/Home/css/common.css">
<link rel="stylesheet" href="/Public/Home/css/list.css">
<script src="/Public/Home/js/jquery-1.12.4.min.js"></script>
<script src="/Public/Home/js/common.js"></script>
<script src="/Public/Home/js/list.js"></script>
<!--[if IE 8]>
<script>
$(document).ready(function () {
	$(".filter-more-select.color a:nth-child(3n)").css("border-right", "none");
	$(".list li:nth-child(4n)").css("margin-right", "0");
});
</script>
<![endif]-->
</head>
<body>
<!-- header start -->
    <include file="Public/header" />
<!-- header end -->    


<div class="crumbs">
	<a href="/">首页</a>
	<em>&gt;</em>
	<span>{$Think.session.mycity}二手车</span>
</div>
<!-- breadcrumbs end -->
<script type="text/javascript">

// $(function () {
//     $.ajax({
//         url: "/home/index/get_car_list?pa=0&ma=40&or=d&pl={$Think.session.mycity}&ci={$Think.session.citype}",
//         type: "get",
//         dataType: 'html',
//         success: function (res) {
//         	if(res != null){
// 				$('#car_list').append(res);
//         		$('#car_list').show();
//         	}else{
//         		$('#no_car').show();
//         	}
//         }
//     }) 
// });
function jumpUrl(key,value) {
	url = "/home/index/get_car_list?pa=0&ma=40";
    window.location.href = makeurl(key, value, url);
}

function makeurl(key, value, url) {
    if (key == 'or')
        url += '&' + key + '=' + value;
    else
        url += "&or={$or}";
    if (key == 'ci')
        url += '&' + key + '=' + value;
    else
        url += "&ci={$Think.session.citype}";
    if (key == 'pl')
        url += '&' + key + '=' + value;
    else
        url += "&pl={$Think.session.mycity}";
    if (key == 'ke')
        url += '&' + key + '=' + value;
    else
        url += "&ke={$getData.ke}";
    var resetse = false;
    if (key == 'br')
    {
        url += '&br=' + value;
        resetse = true;
    }
    else
    {
        if ($("#brand .cur").attr('id')) {
            url += "&br={$br}&bid=" + $("#brand .cur").attr('id');
        }
        else {
            url += "&br={$br}&bid=";
        }
       
    }
    if (key == 'se')
        url += '&' + key + '=' + value;
    else
    {
        if (resetse)
            url += "&se=";
        else
            url += "&se={$getData.se}";
    }
        
    if (key == 'pr')
        url += '&' + key + '=' + value;
    else
        url += "&pr={$getData.pr}";
    if (key == 'mo')
        url += '&' + key + '=' + value;
    else
        url += "&mo={$getData.mo}";
    if (key == 'ta')
        url += '&' + key + '=' + value;
    else
        url += "&ta={$getData.ta}";
    if (key == 'ag')
        url += '&' + key + '=' + value;
    else
        url += "&ag={$getData.ag}";
    if (key == 'lo')
        url += '&' + key + '=' + value;
    else
        url += "&lo={$getData.lo}";
    if (key == 'di')
        url += '&' + key + '=' + value;
    else
        url += "&di={$getData.di}";
    if (key == 'en')
        url += '&' + key + '=' + value;
    else
        url += "&en={$getData.en}";
    if (key == 'oi')
        url += '&' + key + '=' + value;
    else
        url += "&oi={$getData.oi}";
    if (key == 'con')
        url += '&' + key + '=' + value;
    else
        url += "&con={$getData.con}";
    if (key == 'sea')
        url += '&' + key + '=' + value;
    else
        url += "&sea={$getData.sea}";
    if (key == 'wat')
        url += '&' + key + '=' + value;
    else
        url += "&wat={$getData.wat}";
    url += "&total={$total}";
    return url;
}
</script>
<!-- filter start -->
<ul class="filter">
	<!-- filter brand start -->
	<li class="clearfix">
		<p class="filter-title">品牌：</p>
		<div class="filter-wrap clearfix" id="brand">
		    
			
		</div>
	</li>
	<!-- filter brand end -->

	<!-- filter class start -->
	<li class="clearfix">
		<p class="filter-title">车系：</p>
		<div class="filter-wrap clearfix" id="series">
			
		</div>
	</li>
	<!-- filter class end -->

	<!-- filter price start -->
	<li class="clearfix">
		<p class="filter-title">价格：</p>
		<div id="price" class="filter-wrap clearfix">
			<a class="filter-item <if condition="$getData.pr eq '' "> cur </if>"  href="javascript:jumpUrl('pr','')">不限</a>
			<a class="filter-item <if condition="$getData.pr eq '0-3' "> cur </if>"  href="javascript:jumpUrl('pr','0-3')">3万以下</a>
			<a class="filter-item <if condition="$getData.pr eq '3-5' "> cur </if>" href="javascript:jumpUrl('pr','3-5')">3-5万</a>
			<a class="filter-item <if condition="$getData.pr eq '5-7' "> cur </if>" href="javascript:jumpUrl('pr','5-7')">5-7万</a>
			<a class="filter-item <if condition="$getData.pr eq '7-9' "> cur </if>" href="javascript:jumpUrl('pr','7-9')">7-9万</a>
			<a class="filter-item <if condition="$getData.pr eq '9-12' "> cur </if>" href="javascript:jumpUrl('pr','9-12')">9-12万</a>
			<a class="filter-item <if condition="$getData.getData.pr eq '12-16' "> cur </if>" href="javascript:jumpUrl('pr','12-16')">12-16万</a>
			<a class="filter-item <if condition="$getData.pr eq '16-20' "> cur </if>" href="javascript:jumpUrl('pr','16-20')">16-20万</a>
			<a class="filter-item <if condition="$getData.showpr eq '大于20万' "> cur </if>" href="javascript:jumpUrl('pr','>20')">20万以上</a>
			<input class="filter-price-input" type="text" id="sprice" value={$showprmin}>
			<span class="filter-price-text">-</span>
			<input class="filter-price-input" type="text" id="eprice" value={$showprmax}>
			<span class="filter-price-text">万</span>
			<button class="filter-price-btn" onclick="diyprice()">筛选</button>
		</div>
	</li>
	<!-- filter price end -->

	<!-- filter age start -->
	<li class="clearfix">
		<p class="filter-title">车龄：</p>
		<div class="filter-wrap clearfix">
			<a class="filter-item <if condition="$ag eq '' "> cur </if>" href="javascript:jumpUrl('ag','')">不限</a>
			<a class="filter-item <if condition="$showage eq '大于5年' "> cur </if>" href="javascript:jumpUrl('ag','>5')">5年以上</a>
			<a class="filter-item <if condition="$showage eq '小于5年' "> cur </if>" href="javascript:jumpUrl('ag','<5')">5年内</a>
			<a class="filter-item <if condition="$showage eq '小于3年' "> cur </if>" href="javascript:jumpUrl('ag','<3')">3年内</a>
			<a class="filter-item <if condition="$showage eq '小于1年' "> cur </if>" href="javascript:jumpUrl('ag','<1')">1年以内</a>
		</div>
	</li>
	<!-- filter age end -->

	<!-- filter more start -->
	<li class="clearfix">
		<p class="filter-title">更多：</p>
		<div class="filter-wrap clearfix">
			<div class="filter-more-wrap">
				<div class="filter-more-title <if condition="$mo neq '' ">cur</if>" id="model"><if condition="$mo neq '' "> {$mo}<else/>车型 </if></div>
				<div class="filter-more-cutline"></div>
				<div class="filter-more-select">
					<a class="filter-more-item" href="javascript:jumpUrl('mo','')">不限</a>
					<a class="filter-more-item" href="javascript:jumpUrl('mo','两厢轿车')">两厢轿车</a>
					<a class="filter-more-item" href="javascript:jumpUrl('mo','三厢轿车')">三厢轿车</a>
					<a class="filter-more-item" href="javascript:jumpUrl('mo','跑车')">跑车</a>
					<a class="filter-more-item" href="javascript:jumpUrl('mo','SUV')">SUV</a>
					<a class="filter-more-item" href="javascript:jumpUrl('mo','MPV')">MPV</a>
				</div>
			</div>
			<div class="filter-more-wrap">
				<div class="filter-more-title <if condition="$sea neq '' ">cur</if>"><if condition="$sea neq '' "> {$titlesea}<else/> 座位</if></div>
				<div class="filter-more-cutline"></div>
				<div class="filter-more-select">
                    <a class="filter-more-item" href="javascript:jumpUrl('sea','')">不限</a>
					<a class="filter-more-item" href="javascript:jumpUrl('sea','2-2')">两座</a>
					<a class="filter-more-item" href="javascript:jumpUrl('sea','4-4')">4座</a>
					<a class="filter-more-item" href="javascript:jumpUrl('sea','5-5')">5座</a>
					<a class="filter-more-item" href="javascript:jumpUrl('sea','6-6')">6座</a>
					<a class="filter-more-item" href="javascript:jumpUrl('sea','>7')">7座以上</a>
				</div>
			</div>
			<div class="filter-more-wrap">
				<div class="filter-more-title <if condition="$lo neq '' ">cur</if>"><if condition="$lo neq '' "> {$showlong}<else/> 行驶里程</if></div>
				<div class="filter-more-cutline"></div>
				<div class="filter-more-select">
					<a class="filter-more-item" href="javascript:jumpUrl('lo','')">不限</a>
					<a class="filter-more-item" href="javascript:jumpUrl('lo','<1')">小于1万公里</a>
					<a class="filter-more-item" href="javascript:jumpUrl('lo','<3')">小于3万公里</a>
					<a class="filter-more-item" href="javascript:jumpUrl('lo','<5')">小于5万公里</a>
					<a class="filter-more-item" href="javascript:jumpUrl('lo','>5')">大于5万公里</a>
				</div>
			</div>
			<div class="filter-more-wrap">
				<div class="filter-more-title <if condition="$en neq '' ">cur</if>"><if condition="$en neq '' "> {$en}<else/> 变速箱</if></div>
				<div class="filter-more-cutline"></div>
				<div class="filter-more-select">
					<a class="filter-more-item" href="javascript:jumpUrl('en','')">不限</a>
					<a class="filter-more-item" href="javascript:jumpUrl('en','手动')">手动</a>
					<a class="filter-more-item" href="javascript:jumpUrl('en','自动')">自动</a>
				</div>
			</div>
			<div class="filter-more-wrap">
				<div class="filter-more-title <if condition="$di neq '' ">cur</if>"><if condition="$di neq '' "> {$showdi}<else/> 排量</if></div>
				<div class="filter-more-cutline"></div>
				<div class="filter-more-select">
					<a class="filter-more-item" href="javascript:jumpUrl('di','')">不限</a>
					<a class="filter-more-item" href="javascript:jumpUrl('di','0-1')">小于1.0L</a>
					<a class="filter-more-item" href="javascript:jumpUrl('di','1-1.6')">1.0-1.6L</a>
					<a class="filter-more-item" href="javascript:jumpUrl('di','1.6-2')">1.6-2.0L</a>
					<a class="filter-more-item" href="javascript:jumpUrl('di','2-3')">2.0-3.0L</a>
					<a class="filter-more-item" href="javascript:jumpUrl('di','>3')">大于3.0L</a>
				</div>
			</div>
			<div class="filter-more-wrap">
				<div class="filter-more-title <if condition="$oi neq '' ">cur</if>"><if condition="$oi neq '' "> {$oi}<else/> 燃油类型</if></div>
				<div class="filter-more-cutline"></div>
				<div class="filter-more-select">
					<a class="filter-more-item" href="javascript:jumpUrl('oi','')">不限</a>
					<a class="filter-more-item" href="javascript:jumpUrl('oi','汽油')">汽油</a>
					<a class="filter-more-item" href="javascript:jumpUrl('oi','柴油')">柴油</a>
					<a class="filter-more-item" href="javascript:jumpUrl('oi','电动')">电动</a>
					<a class="filter-more-item" href="javascript:jumpUrl('oi','油电混合')">油电混合</a>
					<a class="filter-more-item" href="javascript:jumpUrl('oi','其他')">其他</a>
				</div>
			</div>
			
			<div class="filter-more-wrap">
				<div class="filter-more-title <if condition="$con neq '' ">cur</if>"><if condition="$con neq '' "> {$con}<else/> 国别</if></div>
				<div class="filter-more-cutline"></div>
				<div class="filter-more-select">
					<a class="filter-more-item" href="javascript:jumpUrl('con','')">不限</a>
					<a class="filter-more-item" href="javascript:jumpUrl('con','国产')">国产</a>
					<a class="filter-more-item" href="javascript:jumpUrl('con','合资')">合资</a>
					<a class="filter-more-item" href="javascript:jumpUrl('con','进口')">进口</a>
				
				</div>
			</div>
		</div>
	</li>
	<!-- filter more end -->
</ul>
<!-- filter end -->

<!-- selected start -->
<div class="selected clearfix">
	<p class="selected-text">当前筛选&gt;</p>
	<if condition="$br neq '' "><a class="selected-del" href="javascript:jumpUrl('br','')">{$br}</a></if>
	<if condition="$se neq '' "><a class="selected-del" href="javascript:jumpUrl('se','')">{$se}</a></if>
	<if condition="$pr neq '' "><a class="selected-del" href="javascript:jumpUrl('pr','')">{$showpr}</a></if>
	<if condition="$ag neq '' "><a class="selected-del" href="javascript:jumpUrl('ag','')">{$showage}</a></if>
    <if condition="$ta neq '' "><a class="selected-del" href="javascript:jumpUrl('ta','')">{$ta}</a></if>
    <if condition="$showke neq '' "><a class="selected-del" href="javascript:jumpUrl('ke','')">{$showke}</a></if>
	<!--<if condition="$sea neq '' "><a class="selected-del" href="javascript:getBrandRedirectUrl('seatnum','')">{$selectsea}</a></if>
	<if condition="$lo neq '' "><a class="selected-del" href="javascript:getBrandRedirectUrl('long','')">{$selectlo}</a></if>
	<if condition="$co neq '' "><a class="selected-del" href="javascript:getBrandRedirectUrl('color','')">{$co}</a></if>-->
	<a class="selected-reset" href="/index.php?m=Web&c=Index&a=getlist&pa=0&ma=40&ci={$Think.session.citype}&pl={$Think.session.mycity}">重置</a>
	<!--<p class="selected-text">共为您找到&nbsp;<span>{$total}</span>&nbsp;辆好车</p>-->
</div>
<!-- selected end -->

<!-- sort start -->
<div class="sort clearfix">
	<div class="sort-btn-wrap">
		<a class="sort-btn <if condition="$or eq 'd' ">cur</if>" href="javascript:jumpUrl('or','d')">默认排序</a>
		<a class="sort-btn <if condition="$or eq 'n' ">cur</if> " href="javascript:jumpUrl('or','n')">最新发布</a>
		<a class="sort-btn default <if condition="$or eq 'pa' ">up cur<else/>up default</if> " href="javascript:jumpUrl('or','pa')">价格从低到高</a>
        <a class="sort-btn  default <if condition=" $or eq 'pd' ">down cur<else/> down default</if> " href="javascript:jumpUrl('or','pd')">价格从高到低</a>
        <a class="sort-btn  default <if condition="$or eq 'a' "> cur<else/>up default</if>" href="javascript:jumpUrl('or','a')">车龄从低到高</a>
		<a class="sort-btn  default <if condition="$or eq 'l' ">cur<else/>up default</if>" href="javascript:jumpUrl('or','l')">里程从低到高</a>
	</div>
	<div class="sort-checkbox-wrap">
		<a class="sort-checkbox" href="javascript:void(0)"><input onchange="Iswant()" type="checkbox" id="iswant" name="iswant" <if condition="$wat eq 1 ">checked=checked</if>>急售</a>
		<a class="sort-checkbox" href="javascript:void(0)"><input onchange="NewCar()" type="checkbox" id="newcar" name="newcar" <if condition="$ta eq '准新车' ">checked=checked</if>>准新车</a>
	</div>
	<!--<p class="sort-text">共找到&nbsp;<span class="sort-num">{$total}</span>&nbsp;辆<span class="sort-filter"></span></p>-->
    
</div>
<!-- sort end -->
<if condition="$datalist[0][id] neq '' ">
    <!-- list start -->
    <ul class="list clearfix">
        <volist name="datalist" key="k" id="result">
            <li>
                <a href="{:U('Home/Index/builddetail',array('id'=>$result[id]))}">
                    <volist name=":explode(',',$result['imgs'])" id="vx" offset="0" length='1'>
                        <img src="__CARIMG__/{$vx}_cn.png">
                    </volist>
                    <p class="list-title">{$result[na]}</p>
                    <p class="list-info">{$result[ds]}<span></span></p>
                    <p class="list-price">{$result[cp]}万 <s>{$result[newprice]}万</s>
                    <if condition="$result[cw] eq 1 "><span class="red">急售</span></if>
                    <if condition="$result[cn] eq 1 "><span class="green">准新车</span></if>
                    <if condition="$result[ct] eq 1 "><span class="orange">超值</span></if>
                    <if condition="$result[cp] elt 5 "><span class="orange">练手车</span></if>
                    </p>
                </a>
            </li>
        </volist>
    </ul>
    <!-- list end -->
<else />
    <!-- no data start -->
    <div class="nodata clearfix">
        <img class="nodata-img" src="__IMG__/list-nodata.png">
        <div class="nodata-text-wrap">
            <p class="nodata-text1">更多最新车源请联系58链车。</p>
            <p class="nodata-text2">您可以直接联系<span class="header-phone-nodata">400-100-1313</span>，或者登记手机号，您将获取到最新车源。</p>
            <div class="nodata-phone">
                <p>联系电话</p>
                <input id="nodata-phone-input" type="text" placeholder="请输入您的联系方式">
                <button id="nodata-phone-btn">提交需求</button>
                <p id="nodata-phone-error"></p>
            </div>
        </div>
    </div>
</if>
<!-- no data end -->
<!-- pagination start -->
<div class="pagination">
    
    <?php
	    if($_GET['pa']>0)
		{
			echo '<a  href=javascript:jumpUrlPage("'.($_GET['pa']-1).'")>上一页</a>';
		}
		if($rowcount >10)
		{
		    if($_GET['pa']>3)
		    $start =$_GET['pa']-3;
			else
			$start = 1;
			if($_GET['pa']<$rowcount-3)
			$end =$_GET['pa']+3;
			else
			$end =$rowcount;
			for($a=$start;$a<=$end;$a++)
			{
				$p=$a-1;
				if($_GET['pa']==$p)
				{
					echo '<a class="cur"  href=javascript:jumpUrlPage("'.$p.'")>'.$a.'</a>';
				
				}else{
					echo '<a  href=javascript:jumpUrlPage("'.$p.'")>'.$a.'</a>';
				}
			}
			if($end!=$rowcount){
				echo '<span>...</span>';
				echo '<a  href=javascript:jumpUrlPage("'.($rowcount-1).'")>'.$rowcount.'</a>'; 
			}
		}else
		{
			for($a=1;$a<=$rowcount;$a++)
			{
				
				//class="cur"
				$p=$a-1;
				if($_GET['pa']==$p)
				{
					echo '<a class="cur"  href=javascript:jumpUrlPage("'.$p.'")>'.$a.'</a>';
				
				}else{
					echo '<a  href=javascript:jumpUrlPage("'.$p.'")>'.$a.'</a>';
				}
			}
		}
		if($_GET['pa']<$rowcount)
		{
			echo '<a  href=javascript:jumpUrlPage("'.($_GET['pa']+1).'")>下一页</a>';
		}
	?>
	
</div>
<!-- pagination end -->


<!-- footer start -->
    
    <include file="Public/footer" />
</body>
</html>